package com.javasea.web.config.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName LoadConfig
 * @Description TODO
 * @Author longxiaonan@163.com
 * @Date 2018/10/24 0024 16:58
 */
@ConfigurationProperties(prefix = "info.plcs")
@Component
public class LoadConfig2 {

    List<Plc> plcList = new ArrayList<>();

    public List<Plc> getPlcList() {
        return plcList;
    }

    public void setPlcList(List<Plc> plcList) {
        this.plcList = plcList;
    }
}

@Data
class Plc {
    private Integer namespace;
    private String tag;
    private String type;
}
